<!DOCTYPE html>
<html>
<head hexo-theme='https://volantis.js.org/#2.6.6'>
  <meta charset="utf-8">
  <!-- SEO相关 -->
  
    
  
  <!-- 渲染优化 -->
  <meta name="renderer" content="webkit">
  <meta name="force-rendering" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="HandheldFriendly" content="True" >
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  <!-- 页面元数据 -->
  
    <title>手机termux搭建博客 - Blog by:WuRan</title>
  
  
    <meta name="description" content="有的人对termux可能比较了解，它是一个安卓虚拟linux终端APP软件。包含了很多linux命令,以及apt pkg命令可以安装很多软件，知名的有python openssh git zsh php clang nodejs java apache2我就不一一细说了，具体的自行了解。">
  

  <!-- feed -->
  

  <!-- import meta -->
  

  <!-- link -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13/css/all.min.css">
  
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css">

  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">

  

  

  
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css">
  

  

  <!-- import link -->
  

  
  
    
<link rel="stylesheet" href="/css/style.css">

  

  <script>
    function setLoadingBarProgress(num) {
      document.getElementById('loading-bar').style.width=num+"%";
    }
  </script>

  
  
</head>

<body>
  
  <div id="loading-bar-wrapper">
  <div id="loading-bar"></div>
</div>
<header class="l_header shadow blur">
  <div class='container'>
  <div class='wrapper'>
    <div class='nav-sub'>
      <p class="title"></p>
      <ul class='switcher nav-list-h'>
        <li><a class="s-comment fas fa-comments fa-fw" target="_self" href='javascript:void(0)'></a></li>
        
          <li><a class="s-toc fas fa-list fa-fw" target="_self" href='javascript:void(0)'></a></li>
        
      </ul>
    </div>
		<div class="nav-main">
      
        
        <a class="title flat-box" target="_self" href='/'>
          
          
          
            wuran
          
          
        </a>
      

			<div class='menu navigation'>
				<ul class='nav-list-h'>
          
          
          
            
            
              <li>
                <a class="flat-box" href=/
                  
                  
                  
                    id="home"
                  >
                  <i class='fas fa-rss fa-fw'></i>博客
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="flat-box" href=/categories/
                  
                  
                  
                    id="categories"
                  >
                  <i class='fas fa-folder-open fa-fw'></i>分类
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="flat-box" href=/tags/
                  
                  
                  
                    id="tags"
                  >
                  <i class='fas fa-tags fa-fw'></i>标签
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="flat-box" href=/archives/
                  
                  
                  
                    id="archives"
                  >
                  <i class='fas fa-archive fa-fw'></i>归档
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="flat-box" href=/friends/
                  
                  
                  
                    id="friends"
                  >
                  <i class='fas fa-link fa-fw'></i>友链
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="flat-box" href=/about/
                  
                  
                  
                    id="about"
                  >
                  <i class='fas fa-info-circle fa-fw'></i>关于
                </a>
                
              </li>
            
          
          
				</ul>
			</div>

      <div class="m_search">
        <form name="searchform" class="form u-search-form">
          <i class="icon fas fa-search fa-fw"></i>
          <input type="text" class="input u-search-input" placeholder="Search..." />
        </form>
      </div>

			<ul class='switcher nav-list-h'>
				
					<li><a class="s-search fas fa-search fa-fw" target="_self" href='javascript:void(0)'></a></li>
				
				<li>
          <a class="s-menu fas fa-bars fa-fw" target="_self" href='javascript:void(0)'></a>
          <ul class="menu-phone list-v navigation white-box">
            
              
            
              <li>
                <a class="flat-box" href=/
                  
                  
                  
                    id="home"
                  >
                  <i class='fas fa-rss fa-fw'></i>博客
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="flat-box" href=/categories/
                  
                  
                  
                    id="categories"
                  >
                  <i class='fas fa-folder-open fa-fw'></i>分类
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="flat-box" href=/tags/
                  
                  
                  
                    id="tags"
                  >
                  <i class='fas fa-tags fa-fw'></i>标签
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="flat-box" href=/archives/
                  
                  
                  
                    id="archives"
                  >
                  <i class='fas fa-archive fa-fw'></i>归档
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="flat-box" href=/friends/
                  
                  
                  
                    id="friends"
                  >
                  <i class='fas fa-link fa-fw'></i>友链
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="flat-box" href=/about/
                  
                  
                  
                    id="about"
                  >
                  <i class='fas fa-info-circle fa-fw'></i>关于
                </a>
                
              </li>
            
          
            
          </ul>
        </li>
			</ul>
		</div>
	</div>
  </div>
</header>

<script>setLoadingBarProgress(40);</script>



  <div class="l_body nocover">
    <div class='body-wrapper'>
      

<div class='l_main'>
  

  
    <article id="post" class="post white-box reveal shadow article-type-post" itemscope itemprop="blogPost">
      


  <section class='meta'>
    
      
      
      <div class="meta" id="header-meta">
        
          
  <h1 class="title">
    <a href="/2020/04/15/termux001/">
      手机termux搭建博客
    </a>
  </h1>


        
        <div class='new-meta-box'>
          
            
          
            
              
<div class='new-meta-item author'>
  <a href="http://wuran404.gitee.io" rel="nofollow">
    <img src="https://img.thinkxen.net/2020/06/15/b80f6cd90a3b425b.jpg">
    <p>无染</p>
  </a>
</div>

            
          
            
              <div class="new-meta-item date">
  <a class='notlink'>
    <i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i>
    <p>发布于：2020年4月15日</p>
  </a>
</div>

            
          
            
              
  
  <div class='new-meta-item category'>
    <a href='/categories/termux/' rel="nofollow">
      <i class="fas fa-folder-open fa-fw" aria-hidden="true"></i>
      <p>termux</p>
    </a>
  </div>


            
          
            
              
  
    <div class="new-meta-item browse busuanzi">
      <a class='notlink'>
        <i class="fas fa-eye fa-fw" aria-hidden="true"></i>
        <p>
          <span id="busuanzi_value_page_pv"></span>
        </p>
      </a>
    </div>
  


            
          
            
              

            
          
        </div>
        
          <hr>
        
      </div>
    
  </section>


      <section class="article typo">
        <div class="article-entry" itemprop="articleBody">
          
          
          <p>有的人对termux可能比较了解，它是一个安卓虚拟linux终端APP软件。<br>包含了很多linux命令,以及apt pkg命令可以安装很多软件，知名的有python openssh git zsh php clang nodejs java apache2<br>我就不一一细说了，具体的自行了解。</p>
<a id="more"></a>
<h2 id="Termux搭建hexo博客"><a href="#Termux搭建hexo博客" class="headerlink" title="Termux搭建hexo博客"></a>Termux搭建hexo博客</h2><p>提前把termux的apt更换为清华源，具体百度。</p>
<h3 id="1-安装需要的软件"><a href="#1-安装需要的软件" class="headerlink" title="1. 安装需要的软件"></a>1. 安装需要的软件</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ apt install wget git python2 nodejs curl vim clang</span><br></pre></td></tr></table></figure>

<h3 id="2-安装完成之后"><a href="#2-安装完成之后" class="headerlink" title="2. 安装完成之后"></a>2. 安装完成之后</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm config <span class="built_in">set</span> registry https://registry.npm.taobao.org</span><br><span class="line">$ npm install hexo-cli -g <span class="comment">#安装hexo</span></span><br></pre></td></tr></table></figure>

<h3 id="3-初始化hexo"><a href="#3-初始化hexo" class="headerlink" title="3. 初始化hexo"></a>3. 初始化hexo</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">cd</span></span><br><span class="line">$ hexo init blog</span><br></pre></td></tr></table></figure>


<h3 id="4-注册gitee以及创建仓库"><a href="#4-注册gitee以及创建仓库" class="headerlink" title="4. 注册gitee以及创建仓库"></a>4. 注册gitee以及创建仓库</h3><ol>
<li>访问:<a href="http://gitee.com" target="_blank" rel="noopener">http://gitee.com</a> 注册登陆之后</li>
<li>右上角加号创建一个与用户名同名的仓库，这样以后就可以直接http://用户名.gitee.io访问博客。<br><img src="/.io//1.jpg" alt="1"><br><img src="/.io//2.jpg" alt="2"></li>
</ol>
<h3 id="5-初始化完成之后"><a href="#5-初始化完成之后" class="headerlink" title="5. 初始化完成之后"></a>5. 初始化完成之后</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">cd</span> blog/</span><br><span class="line">$ ls</span><br><span class="line">·</span><br><span class="line">_config.yml     <span class="comment">#站点配置文件，可以配置博客主题、博客基本信息</span></span><br><span class="line">db.json         <span class="comment">#缓存文件  hexo g 命令生成</span></span><br><span class="line">node_modules/   <span class="comment">#已安装文件 hexo init 自动生成</span></span><br><span class="line">package.json    <span class="comment">#hexo版本及已安装依赖包版本信息 hexo init 自动生成</span></span><br><span class="line">package-lock.json   <span class="comment">#hexo init命令生成</span></span><br><span class="line">public/         <span class="comment">#生成的静态博客目录 hexo g 生成</span></span><br><span class="line">scaffolds/      <span class="comment">#文章模板文件夹</span></span><br><span class="line"><span class="built_in">source</span>/         <span class="comment">#博客源码目录，存放新建的md博客文件</span></span><br><span class="line">themes/         <span class="comment">#博客主题文件夹</span></span><br></pre></td></tr></table></figure>

<h3 id="6-启动hexo博客网站"><a href="#6-启动hexo博客网站" class="headerlink" title="6. 启动hexo博客网站"></a>6. 启动hexo博客网站</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ hexo g</span><br><span class="line">$ hexo s</span><br><span class="line">$ hexo g &amp;&amp;hexo s	<span class="comment">#或者这样</span></span><br></pre></td></tr></table></figure>
<p>打开手机浏览器<a href="http://localhost:4000" target="_blank" rel="noopener">http://localhost:4000</a><br>页面测试正常之后回到termux CTRL键+c停止</p>
<h3 id="7-查看网站配置文件"><a href="#7-查看网站配置文件" class="headerlink" title="7. 查看网站配置文件"></a>7. 查看网站配置文件</h3><p>大家还记得blog目录下的_config.yml文件吗？<br>我们暂时称它为网站配置文件吧<br>我们用vim命令打开它看看内容。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br></pre></td><td class="code"><pre><span class="line">$ vim _config.yml</span><br><span class="line"><span class="comment">#Hexo Configuration</span></span><br><span class="line"><span class="comment">##Docs: https://hexo.io/docs/configuration.html</span></span><br><span class="line"><span class="comment">##Source: https://github.com/hexojs/hexo/</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#Site 站点主配置</span></span><br><span class="line">title: Hexo  <span class="comment"># 网站标题</span></span><br><span class="line">subtitle:    <span class="comment"># 网站副标题</span></span><br><span class="line">description:   <span class="comment"># 网站描述</span></span><br><span class="line">keywords:      <span class="comment"># 可以不填写保持默认</span></span><br><span class="line">author: John Doe  <span class="comment"># 网站拥有者昵称</span></span><br><span class="line">language:    <span class="comment"># 网站语言设置，一般根据依赖的主题而定</span></span><br><span class="line">timezone:    <span class="comment"># 网站时区设置，一般不填写保持默认</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#URL地址链接设置</span></span><br><span class="line">url: http://yoursite.com   <span class="comment"># 网站url设置</span></span><br><span class="line">root: /                    <span class="comment"># 网站根目录链接</span></span><br><span class="line">permalink: :year/:month/:day/:title/   <span class="comment"># 文章链接，默认是按照 /年/月/日/文章标题 设置的链接</span></span><br><span class="line">permalink_defaults:                    <span class="comment"># 默认链接形式</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#Directory  网站主要目录，这里一般不做改动</span></span><br><span class="line">source_dir: <span class="built_in">source</span></span><br><span class="line">public_dir: public</span><br><span class="line">tag_dir: tags</span><br><span class="line">archive_dir: archives</span><br><span class="line">category_dir: categories</span><br><span class="line">code_dir: downloads/code</span><br><span class="line">i18n_dir: :lang</span><br><span class="line">skip_render:</span><br><span class="line"></span><br><span class="line"><span class="comment">#Writing  网站文章设置，同样一般不做改动</span></span><br><span class="line">new_post_name: :title.md  <span class="comment"># File name of new posts</span></span><br><span class="line">default_layout: post</span><br><span class="line">titlecase: <span class="literal">false</span> <span class="comment"># Transform title into titlecase</span></span><br><span class="line">external_link: <span class="literal">true</span> <span class="comment"># Open external links in new tab</span></span><br><span class="line">filename_case: 0</span><br><span class="line">render_drafts: <span class="literal">false</span></span><br><span class="line">post_asset_folder: <span class="literal">false</span></span><br><span class="line">relative_link: <span class="literal">false</span></span><br><span class="line">future: <span class="literal">true</span></span><br><span class="line">highlight:</span><br><span class="line">	<span class="built_in">enable</span>: <span class="literal">true</span></span><br><span class="line">	line_number: <span class="literal">true</span></span><br><span class="line">	auto_detect: <span class="literal">false</span></span><br><span class="line">	tab_replace:</span><br><span class="line">		  </span><br><span class="line"><span class="comment">#Home page setting  主页设置，一般不做改动</span></span><br><span class="line">index_generator:</span><br><span class="line">	path: <span class="string">''</span></span><br><span class="line">	per_page: 10</span><br><span class="line">	order_by: -date  <span class="comment"># 首页文章排序，默认是按照文章日期递减</span></span><br><span class="line">				  </span><br><span class="line"><span class="comment">#Category &amp; Tag  分类设置，一般不做改动</span></span><br><span class="line">default_category: uncategorized</span><br><span class="line">category_map:</span><br><span class="line">tag_map:</span><br><span class="line"></span><br><span class="line"><span class="comment">#Date / Time format  日期设置，一般不做改动</span></span><br><span class="line">date_format: YYYY-MM-DD</span><br><span class="line">time_format: HH:mm:ss</span><br><span class="line"></span><br><span class="line"><span class="comment">#Pagination  导航页设置，一般不做改动</span></span><br><span class="line">per_page: 10   <span class="comment"># 设置每页展示多少文章</span></span><br><span class="line">pagination_dir: page</span><br><span class="line"></span><br><span class="line"><span class="comment">#Extensions  使用的主题名称，可以在这里切换</span></span><br><span class="line">theme: next  <span class="comment"># 此处切换主题名称</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#Deployment  部署，一般选择部署到Github上</span></span><br><span class="line">deploy:</span><br><span class="line">  <span class="built_in">type</span>: git</span><br><span class="line">  repo:  <span class="comment">#这是github或者gitee库，比如https://gitee.com/wuran404/wuran404.git</span></span><br><span class="line">  branch: master</span><br></pre></td></tr></table></figure>

<h3 id="8-vim基本操作"><a href="#8-vim基本操作" class="headerlink" title="8. vim基本操作"></a>8. vim基本操作</h3><p>还有vim基本命令 vim 某某文件之后怎么编写，我们需要按i或者a之后，即可编写文件内容<br>如何保存：编写好之后，我们需要按ESC键进入默认模式，然后输入英文的冒号:wq回车即可<br>搜索关键字：vim默认模式下输入/跟上你要搜索的内容然后回车<br>按N或者n是上下搜索，比如我/theme回车按n，找到theme了！</p>
<h3 id="9-主要修改以下内容"><a href="#9-主要修改以下内容" class="headerlink" title="9. 主要修改以下内容"></a>9. 主要修改以下内容</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment"># Site 站点主配置</span></span><br><span class="line">title: 无染博客  <span class="comment">#网站标题修改</span></span><br><span class="line">subtitle: so easy~  <span class="comment">#副标题修改</span></span><br><span class="line">description:  <span class="comment">#网站描述</span></span><br><span class="line">keywords: hexo,next,Java,blog    <span class="comment">#网站关键字,用英文逗号分开</span></span><br><span class="line">author: Sanarous   <span class="comment">#此处填写你自己的昵称  </span></span><br><span class="line">language: zh-CN    <span class="comment">#配置网站语言，注意英文冒号:后面有一个空格,修改语言提前看下themes/某某主题下的language目录是否有zh-CN或者zh-Hans</span></span><br><span class="line"></span><br><span class="line">url: http://wuran404.gitee.io <span class="comment">#修改为你注册的域名</span></span><br><span class="line">root: /</span><br><span class="line">post_asset_folder: <span class="literal">true</span></span><br><span class="line">themes: hexo-theme-xoxo	<span class="comment">#这是我下载的主题，请更换为你的主题</span></span><br><span class="line">deploy:</span><br><span class="line">	<span class="built_in">type</span>: git</span><br><span class="line">	repo: http://********.git	<span class="comment">#修改为你的共享库地址</span></span><br><span class="line">	branch: master</span><br><span class="line"><span class="comment">#然后在某处添加如下内容</span></span><br><span class="line">search:</span><br><span class="line">	path: search.xml</span><br><span class="line">	field: post</span><br><span class="line"><span class="comment"># 按esc加冒号:wq保存退出</span></span><br></pre></td></tr></table></figure>
<h3 id="10-修改好之后上传代码到gitee库"><a href="#10-修改好之后上传代码到gitee库" class="headerlink" title="10. 修改好之后上传代码到gitee库"></a>10. 修改好之后上传代码到gitee库</h3><p>基本都配置好之后就可以上传到服务器上了。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo g &amp;&amp;hexo d <span class="comment">#执行之后会提示输入用户名和密码，密码输入过程中不显示。</span></span><br></pre></td></tr></table></figure>
<p>上传完成之后打开gitee<br><img src="/.io//3.jpg" alt="3"><br><img src="/.io//4.jpg" alt="4"><br><img src="/.io//5.jpg" alt="5"></p>
<p>每次添加完文章都需要进行下面最后这步来更新<br><img src="/.io//6.jpg" alt="6"><br>blog就这样搭建好了，访问http://用户名.gitee.io/<br>如何写文章具体的百度吧。<br>有任何问题都可以添加qq或者群:419281117(同号)</p>

          
            <div class='article_footer'>
              
                
  
    
    



  

  
    
    



  

  
    
    

<section class="widget copyright  desktop mobile">
  <div class='content'>
    
      <blockquote>
        
          
            <p>博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议</p>

          
        
          
            <p>本文永久链接是：<a href=http://wuran404.gitee.io/2020/04/15/termux001/>http://wuran404.gitee.io/2020/04/15/termux001/</a></p>
          
        
      </blockquote>
    
  </div>
</section>

  

  
    
    

<section class="widget qrcode  desktop mobile">
  

  <div class='content article-entry'>
    
      
        <div class='fancybox'><img src='https://img.thinkxen.net/2020/07/03/e145b57a6eda7886.jpg'
        
          height='64px'
        ></div>
      
    
      
        <div class='fancybox'><img src='https://img.thinkxen.net/2020/07/03/b81985a54fa837d5.jpg'
        
          height='64px'
        ></div>
      
    
  </div>
</section>

  


              
            </div>
          
        </div>
        
          


  <section class='meta' id="footer-meta">
    <div class='new-meta-box'>
      
        
          <div class="new-meta-item date" itemprop="dateUpdated" datetime="2020-07-07T15:51:40+08:00">
  <a class='notlink'>
    <i class="fas fa-edit fa-fw" aria-hidden="true"></i>
    <p>更新于：2020年7月7日</p>
  </a>
</div>

        
      
        
          

        
      
        
          
  <div class="new-meta-item share -mob-share-list">
  <div class="-mob-share-list share-body">
    
      
        <a class="-mob-share-qq" title="" rel="external nofollow noopener noreferrer"
          
          href="http://connect.qq.com/widget/shareqq/index.html?url=http://wuran404.gitee.io/2020/04/15/termux001/&title=手机termux搭建博客 - Blog by:WuRan&summary=有的人对termux可能比较了解，它是一个安卓虚拟linux终端APP软件。包含了很多linux命令,以及apt pkg命令可以安装很多软件，知名的有python openssh git zsh php clang nodejs java apache2我就不一一细说了，具体的自行了解。"
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/qq.png">
          
        </a>
      
    
      
        <a class="-mob-share-qzone" title="" rel="external nofollow noopener noreferrer"
          
          href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://wuran404.gitee.io/2020/04/15/termux001/&title=手机termux搭建博客 - Blog by:WuRan&summary=有的人对termux可能比较了解，它是一个安卓虚拟linux终端APP软件。包含了很多linux命令,以及apt pkg命令可以安装很多软件，知名的有python openssh git zsh php clang nodejs java apache2我就不一一细说了，具体的自行了解。"
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/qzone.png">
          
        </a>
      
    
      
        <a class="-mob-share-weibo" title="" rel="external nofollow noopener noreferrer"
          
          href="http://service.weibo.com/share/share.php?url=http://wuran404.gitee.io/2020/04/15/termux001/&title=手机termux搭建博客 - Blog by:WuRan&summary=有的人对termux可能比较了解，它是一个安卓虚拟linux终端APP软件。包含了很多linux命令,以及apt pkg命令可以安装很多软件，知名的有python openssh git zsh php clang nodejs java apache2我就不一一细说了，具体的自行了解。"
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/weibo.png">
          
        </a>
      
    
  </div>
</div>



        
      
    </div>
  </section>


        
        
          <div class="prev-next">
            
              <a class='prev' href='/2020/04/27/termux002adb/'>
                <p class='title'><i class="fas fa-chevron-left" aria-hidden="true"></i>利用termux安装adb给另一台刷机</p>
                <p class='content'>Termux使用ADB工具刷机一不小心在百度上看到的，我就搬过来了。以前也尝试过但不是用Termux而且有很多功能不需要root


A是工作机 B是被刷机刷机有两种方式:adb网络调试 usb...</p>
              </a>
            
            
          </div>
        
      </section>
    </article>
  

  
    <!-- 显示推荐文章和评论 -->



  


  




<!-- 根据页面mathjax变量决定是否加载MathJax数学公式js -->



  <script>
    window.subData = {
      title: '手机termux搭建博客',
      tools: true
    }
  </script>


</div>
<aside class='l_side'>
  
  

  
    
    



  <section class="widget toc-wrapper shadow desktop mobile" id="toc-div" >
    
  <header>
    
      <i class="fas fa-list fa-fw" aria-hidden="true"></i><span class='name'>本文目录</span>
    
  </header>


    <div class='content'>
        <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Termux搭建hexo博客"><span class="toc-text">Termux搭建hexo博客</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-安装需要的软件"><span class="toc-text">1. 安装需要的软件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-安装完成之后"><span class="toc-text">2. 安装完成之后</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-初始化hexo"><span class="toc-text">3. 初始化hexo</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-注册gitee以及创建仓库"><span class="toc-text">4. 注册gitee以及创建仓库</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-初始化完成之后"><span class="toc-text">5. 初始化完成之后</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-启动hexo博客网站"><span class="toc-text">6. 启动hexo博客网站</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-查看网站配置文件"><span class="toc-text">7. 查看网站配置文件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-vim基本操作"><span class="toc-text">8. vim基本操作</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-主要修改以下内容"><span class="toc-text">9. 主要修改以下内容</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#10-修改好之后上传代码到gitee库"><span class="toc-text">10. 修改好之后上传代码到gitee库</span></a></li></ol></li></ol>
    </div>
  </section>


  


</aside>


  
  <footer class="clearfix">
    <br><br>
    
      
        <div class="aplayer-container">
          

  
    <meting-js
      theme='#1BCDFC'
      autoplay='false'
      volume='0.7'
      loop='all'
      order='list'
      fixed='false'
      list-max-height='340px'
      server='netease'
      type='playlist'
      id='4901299102'
      list-folded='true'>
    </meting-js>
  


        </div>
      
    
      
        <br>
        <div class="social-wrapper">
          
            
              <a href="/atom.xml"
                class="social fas fa-rss flat-btn"
                target="_blank"
                rel="external nofollow noopener noreferrer">
              </a>
            
          
            
              <a href="mailto:me@xaoxuu.com"
                class="social fas fa-envelope flat-btn"
                target="_blank"
                rel="external nofollow noopener noreferrer">
              </a>
            
          
            
              <a href="https://github.com/xaoxuu"
                class="social fab fa-github flat-btn"
                target="_blank"
                rel="external nofollow noopener noreferrer">
              </a>
            
          
            
              <a href="https://music.163.com/#/user/home?id=63035382"
                class="social fas fa-headphones-alt flat-btn"
                target="_blank"
                rel="external nofollow noopener noreferrer">
              </a>
            
          
        </div>
      
    
      
        <div><p>博客内容遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="noopener">署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议</a></p>
</div>
      
    
      
        本站使用
        <a href="https://volantis.js.org/" target="_blank" class="codename">Volantis</a>
        作为主题，总访问量为
          <span id="busuanzi_value_site_pv"><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span>
          次
        
      
    
      
        <div class='copyright'>
        <p><a href="https://xaoxuu.com" target="_blank" rel="noopener">Copyright © 2017-2020 Mr. X</a></p>

        </div>
      
    
  </footer>

<script>setLoadingBarProgress(80);</script>


      <script>setLoadingBarProgress(60);</script>
    </div>
    <a class="s-top fas fa-arrow-up fa-fw" href='javascript:void(0)'></a>
  </div>
  
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4/dist/jquery.min.js"></script>


  <script>
    
    var SEARCH_SERVICE = "hexo" || "hexo";
    var ROOT = "/" || "/";
    if (!ROOT.endsWith('/')) ROOT += '/';
  </script>





  <script async src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2/js/instant_page.js" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>


  <script src="https://cdn.jsdelivr.net/npm/scrollreveal@4.0.6/dist/scrollreveal.min.js"></script>
  <script type="text/javascript">
    $(function() {
      ScrollReveal().reveal('.l_main .reveal', {
        distance: '8px',
        duration: '800',
        interval: '100',
        scale: '1'
      });
    });
  </script>


  
<script src="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.js"></script>

  <script type="text/javascript">
    $(function() {
      Waves.attach('.flat-btn', ['waves-button']);
      Waves.attach('.float-btn', ['waves-button', 'waves-float']);
      Waves.attach('.float-btn-light', ['waves-button', 'waves-float', 'waves-light']);
      Waves.attach('.flat-box', ['waves-block']);
      Waves.attach('.float-box', ['waves-block', 'waves-float']);
      Waves.attach('.waves-image');
      Waves.init();
    });
  </script>


  <script defer src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-busuanzi@2.3/js/busuanzi.pure.mini.js"></script>



  
  
  
    
<script src="https://cdn.jsdelivr.net/npm/jquery-backstretch@2.1.18/jquery.backstretch.min.js"></script>

    <script type="text/javascript">
      $(function(){
        var imgs=["https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/67239FBB-E15D-4F4F-8EE8-0F1C9F3C4E7C.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/B951AE18-D431-417F-B3FE-A382403FF21B.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/AEB33F9D-7294-4CF1-B8C5-3020748A9D45.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/2884F904-F1F3-479E-AE27-5EBC291B63B0.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/10A0FCE5-36A1-4AD0-8CF0-019259A89E03.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/250662D4-5A21-4AAA-BB63-CD25CF97CFF1.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/298468D7-E388-44A8-8CC5-8213BDC33CED.jpeg"];
        if ('true' == 'true') {
          function shuffle(arr){
            /*From countercurrent-time*/
            var n = arr.length;
            while(n--) {
              var index = Math.floor(Math.random() * n);
              var temp = arr[index];
              arr[index] = arr[n];
              arr[n] = temp;
            }
          }
          shuffle(imgs);
        }
        if ('') {
          $('').backstretch(
            imgs,
          {
            duration: "20000",
            fade: "1500"
          });
        } else {
          $.backstretch(
            imgs,
          {
            duration: "20000",
            fade: "1500"
          });
        }
      });
    </script>
  



  
    
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js"></script>

  
    
<script src="https://cdn.jsdelivr.net/npm/meting@2.0/dist/Meting.min.js"></script>

  













  
<script src="/js/app.js"></script>



  
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.5/js/search.js"></script>



  
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2/js/comment_typing.js"></script>






<!-- 复制 -->

  <script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="fas fa-copy"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('fa-copy');
        $icon.addClass('fa-check-circle');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('fa-check-circle');
          $icon.addClass('fa-copy');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('fa-copy');
        $icon.addClass('fa-times-circle');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('fa-times-circle');
          $icon.addClass('fa-copy');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>




<!-- fancybox -->
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script>
  function pjax_fancybox() {
    $(".article-entry").find("img").not('.inline').not('a img').each(function () { //渲染 fancybox
      var element = document.createElement("a"); // a 标签
      $(element).attr("pjax-fancybox", "");  // 过滤 pjax
      $(element).attr("href", $(this).attr("src"));
      if ($(this).attr("data-original")) {
        $(element).attr("href", $(this).attr("data-original"));
      }
      $(element).attr("data-fancybox", "images");
      var caption = "";   // 描述信息
      if ($(this).attr('alt')) {  // 标准 markdown 描述信息
        $(element).attr('data-caption', $(this).attr('alt'));
        caption = $(this).attr('alt');
      }
      var div = document.createElement("div");
      $(div).addClass("fancybox");
      $(this).wrap(div); // 最外层套 div ，其实主要作用还是 class 样式
      var span = document.createElement("span");
      $(span).addClass("image-caption");
      $(span).text(caption); // 加描述
      $(this).after(span);  // 再套一层描述
      $(this).wrap(element);  // 最后套 a 标签
    })
    $(".article-entry").find("img").fancybox({
      selector: '[data-fancybox="images"]',
      hash: false,
      loop: false,
      closeClick: true,
      helpers: {
        overlay: {closeClick: true}
      },
      buttons: [
        "zoom",
        "close"
      ]
    });
  };
  $(function () {
    pjax_fancybox();
  });
</script>





  <script>setLoadingBarProgress(100);</script>
</body>
</html>
